package com.hxzy.projectssmplus.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hxzy.projectssmplus.entity.HouseSellingQuali;
import com.hxzy.projectssmplus.mapper.HouseSellingQualiMapper;
import com.hxzy.projectssmplus.service.HouseSellingQualiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HouseSellingQualiServiceImpl extends ServiceImpl<HouseSellingQualiMapper, HouseSellingQuali> implements HouseSellingQualiService {

    @Autowired
    private HouseSellingQualiMapper houseSellingQualiMapper;


    @Override
    public List<HouseSellingQuali> queryByNewHouseId(Long houseId) {

        QueryWrapper<HouseSellingQuali> queryWrapper=new QueryWrapper<>();
        queryWrapper.eq("house_new_id",houseId);
        List<HouseSellingQuali> houseSellingQualis = this.houseSellingQualiMapper.selectList(queryWrapper);

        return houseSellingQualis;
    }

    @Override
    public Integer addSell(HouseSellingQuali houseSellingQuali) {
        int insert = this.houseSellingQualiMapper.insert(houseSellingQuali);
        return insert;
    }
}
